﻿@using WeatherForecast.Mvc.Models

@using Kendo.Mvc.UI;

@(Html.Kendo().DropDownListFor(e => e)
.DataSource(data =>
    {
        data.Read("GetAllTowns", "Forecasts");
        data.ServerFiltering(true);
    })
.DataTextField("Name")
.DataValueField("TownId")
    .Name("TownId")
    .AutoBind(true)
        /*.HtmlAttributes(new { style="width:auto" })*/)
@*if auto not given, the control takes up the whole space*@
